package com.gjm.demo.controller;

import com.gjm.demo.model.Student;
import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;

@Controller
public class StuController {

    //属性注入
//    @Qualifier("s1")
//    @Autowired
//    public Student student;


    @Resource(name = "s1")
    private Student student;

    public void print() {
        System.out.println(student);
    }
}
